//
//  NearbyServiceCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/9/21.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

class NearbyServiceCell: BaseTableViewCell {
    
    @IBOutlet weak var redView: UIView!
    
    @IBOutlet weak var rightTextLabel: UILabel!
    
    var str : String?{
        
        didSet{
            
            if str == nil {
                return
            }
            
            
            rightTextLabel.text = str
            
            
        }
    
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.white
        
        rightTextLabel.textColor = UIColor.black
        
        rightTextLabel.highlightedTextColor = UIColor.red
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        contentView.backgroundColor = selected == true ? UIColor.white : UIColor.viewBgGrey()
        
        isHighlighted = selected
        
        rightTextLabel.isHighlighted = selected
        
        redView.isHidden = !selected


    }
    
}
